package com.sinochem.yunlian.ship.base.biz;

import com.sinochem.yunlian.ship.base.entity.BsDataDictItem;
import com.sinochem.yunlian.ship.base.mapper.BsDataDictItemMapper;
import com.sinochem.yunlian.ship.base.vo.response.DictItemVo;
import com.sinochem.yunlian.ship.common.biz.BaseBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author pan
 * @email ${email}
 * @date 2017-12-11 10:25:23
 */
@Service
public class BsDataDictItemBiz extends BaseBiz<BsDataDictItemMapper,BsDataDictItem> {

    /**
     * 查询可用的
     * */
    public List<BsDataDictItem> findByDictCode(String dictCode) {
        return this.mapper.findByDictCode(dictCode);
    }

    public List<BsDataDictItem> findByDictCodeForView(String dictCode) {
        return this.mapper.findByDictCodeForView(dictCode);
    }
	public List<BsDataDictItem> findByDictCodeForOM(String dictCode) {
		return this.mapper.findByDictCodeForOM(dictCode);
	}

	public String getItemName(Long id) {
	
		return mapper.getItemName(id);
	}

	public String getItemNameByItemValueByMap(HashMap<Object, Object> hashMap) {
		
		return mapper.getItemNameByItemValueByMap(hashMap);
	}


	public List<BsDataDictItem> findByDictCodeAndGoupId(String dictCode,Integer groupId) {
		return mapper.findByDictCodeAndItemGroup(dictCode,groupId);
	}
}